ActionController::Routing::Routes.draw do |map|
  # The priority is based upon order of creation: first created -> highest priority.

  # Sample of regular route:
  #   map.connect 'products/:id', :controller => 'catalog', :action => 'view'
  # Keep in mind you can assign values other than :controller and :action

  # Sample of named route:
  #   map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
  # This route can be invoked with purchase_url(:id => product.id)

  # Sample resource route (maps HTTP verbs to controller actions automatically):
  #   map.resources :products

  # Sample resource route with options:
  #   map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }

  # Sample resource route with sub-resources:
  #   map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller
  
  # Sample resource route with more complex sub-resources
  #   map.resources :products do |products|
  #     products.resources :comments
  #     products.resources :sales, :collection => { :recent => :get }
  #   end

  # Sample resource route within a namespace:
  #   map.namespace :admin do |admin|
  #     # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
  #     admin.resources :products
  #   end

  # You can have the root of your site routed with map.root -- just remember to delete public/index.html.
  map.root :controller => "homes", :action => :show, :id => :default
  
  map.namespace :tools do |tools|
    tools.resources :weather_forecasts, 
      :new => {      
        :new_in_show => :get
      },
      :member => {
        :edit_in_show => :get,
        :update_in_show => :put,      
        :destroy_in_show => :delete,
        :copy => :post
      }, 
      :collection => {
        :create_in_show => :post,
        :index_in_show => :get,
        :send_email => :post,
        :send_sm => :post
      }
      
    tools.resources :site_healths,
      :new => {      
        :new_in_show => :get
      },
      :member => {
        :edit_in_show => :get,
        :update_in_show => :put,      
        :destroy_in_show => :delete,
        :copy => :post
      }, 
      :collection => {
        :create_in_show => :post,
        :index_in_show => :get,
        :send_email => :post,
        :send_sm => :post,
        :test_site_heart_beat => :post,
        :stat => :get
      }
    
    tools.resources :favorite_searchs, 
      :new => {      
        :new_in_show => :get
      },
      :member => {
        :edit_in_show => :get,
        :update_in_show => :put,      
        :destroy_in_show => :delete,
        :copy => :post
      }, 
      :collection => {
        :create_in_show => :post,
        :index_in_show => :get
      }
      
    tools.resources :number_locations, 
      :new => {      
        :new_in_show => :get
      },
      :member => {
        :edit_in_show => :get,
        :update_in_show => :put,      
        :destroy_in_show => :delete,
        :copy => :post
      }, 
      :collection => {
        :create_in_show => :post,
        :index_in_show => :get
      }
      
    tools.resources :flashs,
      :new => {      
        :new_in_show => :get
      },
      :member => {
        :edit_in_show => :get,
        :update_in_show => :put,      
        :destroy_in_show => :delete,
        :copy => :post
      }, 
      :collection => {
        :create_in_show => :post,
        :index_in_show => :get,        
        :add_flash_to_my_dish => :post
      }
    tools.resources :web_fetions,
      :new => {      
        :new_in_show => :get
      },
      :member => {
        :edit_in_show => :get,
        :update_in_show => :put,      
        :destroy_in_show => :delete,
        :copy => :post
      }, 
      :collection => {
        :create_in_show => :post,
        :index_in_show => :get,
        :send_sm => :post,
        :friends => :get
      }
    tools.resources :zhui_tian_ya_hot_posts,
      :collection => {
        :create_in_show => :post,
        :index_in_show => :get,
        :mines => :get,
        :auto_complete => :get,
        :my_zhui => :get,
        :new_and_hot => :get
      },
      :member => {
        :high_or_low_light_lz => :put,
        :read => :put,
        :zhui => :put,
        :update_zhui => :put,
        :edit_zhui => :get,
        :give_up => :put,
        :show_zhui => :get,
        :preview => :get
      }
      
    tools.resources :open_apis, 
      :new => {      
        :new_in_show => :get
      },
      :member => {
        :edit_in_show => :get,
        :update_in_show => :put,      
        :destroy_in_show => :delete,
        :copy => :post
      }, 
      :collection => {
        :create_in_show => :post,
        :index_in_show => :get
      }
  end
  
  map.resources :sms,
    :member => {
      :resend => :put
    }
       
  map.resources :users, 
    :collection => {
      :send_password_sm => :post,
      :send_password_email => :post,
      :create_sm => :post,
      :create_consume_in_taobao_feed => :post
    },
    :member => {
      :edit_base_info => :get,
      :edit_fetion => :get,
      :edit_password => :get,
      :show_base_info => :get,
      :show_fetion => :get,
      :show_password => :get,
      :update_base_info => :put,
      :update_fetion => :put,
      :update_password => :put,
      :update_portalets_layout => :put,
      :update_fetion_in_web_fetion_portalet => :put,
      :check_fetion_changed => :get,
      :inverse_star => :put,
      :bind_fetion_verify => :get,
      :bind_fetion => :put,
      :feeds => :get,
      :last_sms => :get,
      :new_sm => :get,
      :new_consume_in_taobao_feed => :get,
      :destroy_consume_in_taobao_feed => :delete,
      :consume_in_taobao_feeds => :get
    }
  
  map.resources :fetions, 
    :member => {
      :verify => :get,
      :new_verify_in_users_index => :get,
      :check_verify_in_users_index => :put      
    },
    :collection => {
      :send_check_code_sm => :post      
    }
  
  map.resources :tools, 
    :member => {
      :seo => :get
    }

  map.resources :dospy_waters
    
  map.resources :infos, 
  :member => {
    :emails_spread => :put,
    :sms_spread => :put,
    :give_up => :put
  }

  map.resources :hot_posts,
  :member => {
    :reactive => :put,
    :to_be_end => :put,
    :seo => :get,
    :pre_lz_post => :get,
    :next_lz_post => :get
  },
  :collection => {
    
  }
    
  map.resources :lite_fetions,
    :collection => {
      :messages => :get
    },
    :member => {
      :login_verify => :get,
      :login => :put,
      :logout => :put,
      :invert_standing => :put
    }
  
  map.resources :moneys,
    :member => {
      :draw => :put,
      :draw_gift => :put
    },
    :collection => {
      :how_to_earn => :get,
      :earned => :get,
      :feeds => :get
    }
  
  map.resources :sessions,
    :homes,
    :cities,
    :areas,
    :helps,
    :user_logos,
    :tool_logos,
    :tool_types
    
  map.namespace :open_api do |open_api|
    open_api.resources :sms
  end
  
  # See how all your routes lay out with "rake routes"

  # Install the default routes as the lowest priority.
  # Note: These default routes make all actions in every controller accessible via GET requests. You should
  # consider removing or commenting them out if you're using named routes and resources.
  map.connect ':controller/:action/:id'
  map.connect ':controller/:action/:id.:format'
end
